Using Advanced Report Layouts

您所在的位置:网站首页 data columns Using Advanced Report Layouts

Using Advanced Report Layouts

#Using Advanced Report Layouts| 来源: 网络整理| 查看: 265

It is a common requirement to print a batch of documents, such as invoices or purchase orders in a single PDF file. Because these documents are intended for different customers, each document requires that the page numbering be reset and that page totals are specific to the document. If the header and footer display fields from the data (such as customer name), then these must be reset as well.

BI Publisher supports this requirement through the use of a context command. This command allows you to define elements of the report to a specific section. When the section changes, these elements are reset.

The following example demonstrates how to reset the header and footer and page numbering within an output file:

The following XML code is a report that contains multiple invoices:

... Vision, Inc. 2345678 ... Oracle, Inc. 2345685 ... ... ...

Each G_INVOICE element contains an invoice for a potentially different customer. To instruct BI Publisher to start a new section for each occurrence of the G_INVOICE element, add the @section command to the opening for-each statement for the group, using the following syntax:

where group_name is the name of the element for which you want to begin a new section.

For example, the for-each grouping statement for this example is as follows:

The closing tag is not changed.

The following figure shows a sample template for batch reports:

Note:

The G_INVOICE group for-each declaration is still within the body of the report, even though the headers are reset by the command. Description of the illustration GUID-4782470C-48F5-4F97-B5F6-98F94D1F05F4-default.gif

The following table describes the values of the form fields from the template in the previous figure (that shows a sample template for batch reports):

Default Text Entry Form Field Help Text Description

for-each G_INVOICE

Begins the G_INVOICE group, and defines the element as a Section. For each occurrence of G_INVOICE, a new section is started.

N/A

Microsoft Word does not support form fields in the header, therefore the placeholder syntax for the TRX_NUMBER element is placed directly in the template.

end G_INVOICE

Closes the G_INVOICE group.

Now for each new occurrence of the G_INVOICE element, a new section begins. The page numbers restart, and if header or footer information is derived from the data, it is reset as well.



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3